<template>
  <div id="app-3" data-app="app-vue-3">
    <el-menu  class="el-menu-demo" mode="horizontal">
      <el-menu-item index="1" > <router-link to="/index">主应用</router-link> </el-menu-item>
      <el-menu-item index="3" path="/subapp31"> <router-link to="/subapp31">subapp31应用</router-link> </el-menu-item>
      <el-menu-item index="31" path="/subapp31/home"> <router-link to="/subapp31/home">subapp31应用 home</router-link> </el-menu-item>
      <el-menu-item index="4" path="/subapp32">  <router-link to="/subapp32">subapp32应用</router-link>  </el-menu-item>
      <el-menu-item index="41" path="/subapp32/home"> <router-link to="/subapp32/home">subapp32应用 home</router-link> </el-menu-item>

      <el-menu-item index="412" path="/subapp32/home"> <el-button @click="setToken">set token</el-button></el-menu-item>
      
    </el-menu>
    <router-view></router-view>
    <div id="subapp31"></div>
    <div id="subapp32"></div>
  </div>
</template>

<script>

import { actions } from "./utils/communication"

export default {
  name: 'app',
  components: {
   
  },
  methods:{
    setToken(){
      actions.setGlobalState({globalToken: "******" + new Date().getTime()}); 
    }
  }
}
</script>

<style>

</style>
